-- GENERATED SPELL FOR [Stormforged Tactician] --


function spell0_28581(pUnit, Event) --@Arc Weld,n/a--
pUnit:FullCastSpellOnTarget(59085,pUnit:GetMainTank ())
pUnit:RegisterEvent('Sorts_28581', 10000, 1)
end

function spell1_28581(pUnit, Event) --@Welding Beam,n/a--
pUnit:FullCastSpellOnTarget(52778,pUnit:GetMainTank ())
pUnit:RegisterEvent('Sorts_28581', 5000, 1)
end

function spell2_28581(pUnit, Event) --@Welding Beam,n/a--
pUnit:FullCastSpellOnTarget(59166,pUnit:GetMainTank ())
pUnit:RegisterEvent('Sorts_28581', 5000, 1)
end

function Sorts_28581(pUnit, Event)
local choix_sorts_28581 = math.random(0, 2)
if choix_sorts_28581 == 0 then
pUnit:RegisterEvent('spell0_28581', 1, 1)
end
if choix_sorts_28581 == 1 then
pUnit:RegisterEvent('spell1_28581', 1, 1)
end
if choix_sorts_28581 == 2 then
pUnit:RegisterEvent('spell2_28581', 1, 1)
end
end

function mob28581_Action(pUnit, Event)
pUnit:RegisterEvent('Sorts_28581', math.random(1500, 3000), 1)
end

function mob28581_Leave(pUnit, Event)
--pUnit:RemoveEvents();--
end

function mob28581_Kill(pUnit, Event)
--pUnit:RemoveEvents();--
end

function mob28581_Die(pUnit, Event)
pUnit:RemoveEvents();
end

RegisterUnitEvent(28581, 1, 'mob28581_Action')
RegisterUnitEvent(28581, 2, 'mob28581_Leave')
RegisterUnitEvent(28581, 3, 'mob28581_Kill')
RegisterUnitEvent(28581, 4, 'mob28581_Die')
